<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 舞台用相对定位   演员用绝对定位 */
        *{
            margin:0;
            padding:0;
        }
        div{
            width: 200px;
            height: 200px;
            border: 1px solid #000;
            perspective: 300px;
            position: relative;
            margin:100px auto;
        }
        p{
            width: 200px;
            height: 200px;
            position:absolute;
            top:0;
            left:0;
        }
        div p:nth-child(1){
            background-color: rgba(230, 138, 18, 0.74);
            /* 前面 */
            transform:rotateX(0deg) translateZ(100px);
        }
        div p:nth-child(2){
            background-color: rgba(208, 221, 28, 0.856);
            /* 后面 */
            transform:rotateX(180deg) translateZ(100px);
        }
        div p:nth-child(3){
            background-color: rgba(69, 184, 59, 0.664);
            /* 上面 */
             transform:rotateX(90deg) translateZ(100px);
        }
        div p:nth-child(4){
            background-color: rgba(23, 180, 207, 0.692);
            /* 下面 */
             transform:rotateX(-90deg) translateZ(100px);
        }
        div p:nth-child(5){
            background-color: rgba(186, 19, 192, 0.616);
            /* 右面 */
             transform:rotateY(90deg) translateZ(100px);
        }
        div p:nth-child(6){
            background-color: rgba(218, 20, 86, 0.76);
            /* 左面 */
             transform:rotateY(-90deg) translateZ(100px);
        }
    </style>
</head>
<body>
    <div>
        <p></p>
        <p></p>
        <p></p>
        <p></p>
        <p></p>
        <p></p>
    </div>
</body>
</html>